import request from "./index";

// 获取我的自选股列表
export const getWatchlistApi = (params) => {
    return request.post("/watchlist/stockInfoList",params)
}

// 删除我的自选股记录
export const removeWatchlistApi = (id) => {
    return request.delete(`/watchlist/${id}`)
}

// 获取我的自选股实时数据
export const getWatchStockApi = (stockCodes) => {
    return request.post("/python/get_point_stock_data", stockCodes)
}

// 添加自选股，type: 1-根据股票代码添加，2-根据股票名称添加
export const addWatchlistApi = (watchlist) => {
    return request.post("/watchlist", watchlist)
}   

// 获取与自选股相关的新闻列表
export const getSelectNewsApi = (pageNo,pageSize)=>{
    return request.get("/news/listWatchlistNews",{
        params:{
            pageNo,
            pageSize
        }
    })
}